package tingshu.view_object;

import lombok.Data;
import tingshu.data_object.AlbumDO;

/**
 * @author houdaiqin
 * @date 2022/07/17 18:58
 **/
@Data
public class AlbumView {
    public Integer aid;
    public String title;
    public String cover;
    public String state;
    public Integer refCount;

    public AlbumView(AlbumDO albumDO,int refCount) {
        this.aid = albumDO.aid;
        this.title = albumDO.title;
        this.cover = albumDO.cover;
        switch (albumDO.state) {
            case 0: this.state = "已下架"; break;
            case 1: this.state = "未发布"; break;
            case 2: this.state = "已发布"; break;
            default: this.state = "未知"; break;
        }
        this.refCount=refCount;
    }
}